/**
 * 报表  数据类接口
 *
 */
import request from '@/utils/request'

/**
 * 券报表相关
 *
 */
/**
 * @method getCouponIssueLCount
 * @description 获取发行统计
 */
export function getCouponIssueLCount(params) {
  return request({
    url: '/memberAdmin/coupon/issueListCount',
    method: 'get',
    params: params
  })
}

// 获取优惠券投放发行明细
export function getCouponIssueList(params) {
  return request({
    url: '/memberAdmin/coupon/issueList',
    method: 'get',
    params: params
  })
}

// 获取优惠券核销记录
export function getCouponVerifyRecordsList(params) {
  return request({
    url: '/memberAdmin/coupon/verifyRecords',
    method: 'get',
    params: params
  })
}

/**
 * 积分报表相关
 *
 */

/**
 * @method getPointsChangeRecordsCount
 * @description 积分变动统计
 */
// 获取积分变动统计
export function getPointsChangeRecordsCount(params) {
  return request({
    url: '/memberAdmin/memberRecords/points/count',
    method: 'get',
    params: params
  })
}

// 获取积分变动明细
export function getPointsChangeRecordsList(params) {
  return request({
    url: '/memberAdmin/memberRecords/points/list',
    method: 'get',
    params: params
  })
}

/**
 * 积分商城报表相关
 *
 */
/**
 * @method getPointsMallListStats
 * @description 积分商城统计
 */
export function getPointsMallListStats(data) {
  return request({
    url: '/mall_admin/order/list_stats',
    method: 'post',
    data: data
  })
}

// 获取积分商城兑换明细
export function getPointsMallRecordsList(data) {
  return request({
    url: '/mall_admin/order/list',
    method: 'post',
    data: data
  })
}

// 获取积分商城兑换详情
export function getPointsMallRecordsDetail(params) {
  return request({
    url: '/mall_admin/order/detail',
    method: 'get',
    params: params
  })
}

// 获取余额变动记录
export function getBalanceRecordsList(data) {
  return request({
    url: '/balancemanage/getBalanceRecordPage',
    method: 'post',
    data: data
  })
}

// 获取余额统计
export function getBalanceRecordStatistic(data) {
  return request({
    url: '/balancemanage/getBalanceStats',
    method: 'post',
    data: data
  })
}

// 获取员工提成报表
export function getPromotersBonusList(params) {
  return request({
    url: '/memberAdmin/inviteMember/empInviteBonus',
    method: 'get',
    params: params
  })
}

// 获取储值统计报表按时间筛选
export function getRechargeStatisticsByDate(params) {
  return request({
    url: '/memberAdmin/statistics/assetStatistics',
    method: 'get',
    params: params
  })
}

// 获取储值统计报表按门店筛选
export function getRechargeStatisticsByshop(params) {
  return request({
    url: '/memberAdmin/statistics/assetStatisticsByShop',
    method: 'get',
    params: params
  })
}

// 获取储值统计报表按门店筛选
export function getRechargeGrossStatistics(params) {
  return request({
    url: '/memberAdmin/statistics/assetsTrendStatistics',
    method: 'get',
    params: params
  })
}

// 获取超级会员状态
export function querySuperMemberStatus(params) {
  return request({
    url: '/business_admin/superMember/querySuperMemberStatus',
    method: 'get',
    params: params
  })
}
export function getTreeShop(data) {
  return request({
    url: '/business_admin/superMember/getTreeShop ',
    method: 'post',
    data: data
  })
}

// 检查是否满足余额手动确认分账接口
export function isCanBalanceSplit(data) {
  return request({
    url: '/memberAdmin/superMemberBalance/isCanBalanceSplit',
    method: 'post',
    data: data
  })
}
// 手动确认分账接口
export function handleSpilt(data) {
  return request({
    url: '/memberAdmin/superMemberBalance/handleSpilt',
    method: 'post',
    data: data
  })
}

